<template>
    <div>
 <el-table
      :data="preList"
      style="width: 100%"
        @row-click="detail"
    >
     
            <el-table-column align="center" label="序号"  
            type="index" width="180">
            </el-table-column>
            <el-table-column
        prop="servicetype"
        label="业务类型"
        width="180">
      </el-table-column>
      <el-table-column
        prop="servicenumber"
        label="业务编号"
        width="180">
      </el-table-column>
      <el-table-column
        prop="servicestatus"
        label="业务状态"
        width="180">
      </el-table-column>
       <el-table-column
        prop="proposername"
        label="申请人"
        width="180">
      </el-table-column>
       <el-table-column
        prop="idcard"
        label="身份证号码"
        width="180">
      </el-table-column>
    </el-table>
      <!-- 分页 -->
			<div class="page-box">
				<el-pagination background
					layout="total, prev, pager, next, sizes, jumper"
					:current-page.sync="pageNum"
					:page-size.sync="pageSize"
					:total="total"
					:page-sizes="[1, 10, 20, 30, 40, 50, 100]"
					@current-change="showAllPre"
					@size-change="showAllPre">
				</el-pagination>
			</div>
    </div>
</template>
<script>
export default{
    name:"PresalePermitRegistration",
    data(){
        return{
              pageNum : 0,
        pageSize : 1,
        total : null,
            preList:[{}]
        }
    },mounted () {
        this.showAllPre();
    },
    methods: {
        showAllPre(){
            var the = this;
            this.sa.ajax("/presale/getOaService",
            {
               'pageNum' : the.pageNum, 
              'pageSize' : the.pageSize
            },
            function(data){
                the.preList = data.data.data.list;
                the.total = data.data.data.total;
              the.pageNum = data.data.data.pageNum;
              the.pageSize = data.data.data.pageSize;
            }.bind(this)
            )
        },
        detail(serviceid){
              console.log(serviceid)
            var tab = {id: 'addPreSale', name: '登记预告许可', view: () => import('@/sa-view/WmtbuildManager/addPreSale.vue'), params: {serviceid: serviceid} };
            this.sa_admin.showTab(tab);
        }
    }
}
</script>